
package com.epam.edu.task03.dances;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for DanceType.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * <p>
 * <pre>
 * &lt;simpleType name="DanceType">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="ballroom"/>
 *     &lt;enumeration value="folk"/>
 *     &lt;enumeration value="pop"/>
 *     &lt;enumeration value="eastern"/>
 *   &lt;/restriction>
 * &lt;/simpleType>
 * </pre>
 * 
 */
@XmlType(name = "DanceType", namespace = "Dance")
@XmlEnum
public enum DanceType {

    @XmlEnumValue("ballroom")
    BALLROOM("ballroom"),
    @XmlEnumValue("folk")
    FOLK("folk"),
    @XmlEnumValue("pop")
    POP("pop"),
    @XmlEnumValue("eastern")
    EASTERN("eastern");
    private final String value;

    DanceType(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static DanceType fromValue(String v) {
        for (DanceType c: DanceType.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}
